package com.ita.util;

import java.util.Random;

public class StringHelper {

	public static String[] getTwoParams(String string) {

		string = string.toUpperCase();
		String s[] = new String[2];
		s[0] = string.split(",")[0].split(":")[1];// name
		s[1] = string.split(",")[1].split(":")[1];// sex

		return s;
	}

	public static String[] getFiveParams(String string) {

		String s[] = new String[5];
		s[0] = string.split(",")[0].split(":")[1];// name
		s[1] = string.split(",")[1].split(":")[1];// sex
		s[2] = string.split(",")[2].split(":")[1];// birthday
		s[3] = string.split(",")[3].split(":")[1];// address
		s[4] = string.split(",")[4].split(":")[1];// phone

		return s;
	}

	public static String getRandomId() {

		Random random = new Random();
		int result = random.nextInt(100);

		return result + "";
	}
}
